<template>
	<view class="content">
		<view class="input-group">
			<view class="input-row">
				<text class="title">重置密码</text>
				<input type="text" focus clearable v-model="password" placeholder="请输入密码" maxlength="6"></input>
			</view>
		</view>

		<view class="btn-row">
			<button class="cu-btn bg-green lg block" @tap="findPassword">提交</button>
		</view>
	</view>
</template>

<script>
	import service from '../../service.js';
	import mInput from '../../components/m-input.vue';

	export default {
		components: {
			mInput
		},
		data() {
			return {
				password: ''
			}
		},
		methods: {
			findPassword() {
				/**
				 * 仅做示例
				 */
				if (this.password.length < 6) {
					uni.showToast({
						icon: 'none',
						title: '密码格式不正确',
					});
					return;
				}
				uni.showToast({
					icon: 'none',
					title: '已重置密码，请重新登录',
					duration: 3000
				});
			}
		}
	}
</script>

<style>
	.input-row {
		width: 80%;
		height: 200rpx;
		margin: 50rpx auto;
	}

	text {
		margin: 0 210rpx;
		font-size: 44rpx;
	}

	input {
		margin: 30rpx 0;
		height: 80rpx;
		border: solid 1px #d4d4d4;
		font-size: 22px;
	}
</style>